from multiprocessing import Pool, Manager
import time
manager = Manager()
def read_query(que):
    while 1:     
        i = que.get()
        return
        if i =='kill':
            que.put('kill')
            break
        time.sleep(0.01)
        print(i)

queue = manager.Queue(10)
queue1 = manager.Queue(5)
pool = Pool(5)
pool.map_async(read_query, (queue, queue, queue))

for i in range(10):
    print('put %s'%i)
    queue.put(i)

queue.put('kill')


pool.close()
pool.join()
# for _ in range(10):
#     ret = queue.get()
#     print(ret)